﻿<%@ Page Language="C#" AutoEventWireup="true"Codefile="membership_register.aspx.cs" Inherits="webs.membership_register" %>

<%@ Register Src="_controls/header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register src="_controls/footer.ascx" tagname="footer" tagprefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="ctl00_Head1">
    <title>曼福旅游保险</title>
    <link rel="canonical" href="http://www.insureandgo.com" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="travel insurance, holiday insurance, annual travel insurance, ski insurance, backpackers insurance, annual, cheap, uk, insurance, insureandgo, InsureandGo," />
    <meta name="description" content="Buy cheap travel insurance from InsureandGo, the UK's largest direct travel insurer. Wide range of policies available. Prices from under &pound;6. Kids go free." />
    <meta name="robots" content="noodp" />
    <meta name="google-site-verification" content="_p3NAz7IjML6o1UMAukUDLvJ-q3yRO-14nTqkjd0dDI" />
    <meta name="WT.pi" content="index.html" />
    <link rel="shortcut icon" href="favicon.ico" />
    <link href="_common/styles/layout.css" rel="stylesheet" type="text/css" />
    <!--[if lte IE 7]>
        <link rel="stylesheet" type="text/css" href="_common/styles/lteie7.css" />
    <![endif]-->
    <!-- jquery style sheets -->
    <!-- jquery libraries -->
    <script src="_common/scripts/jquery/jquery-1.4.2.min.js" type="text/javascript"></script> 
    <script type="text/javascript" src="_common/scripts/jquery_regform_validator.js"></script> 
    <script src="_common/scripts/util.js" type="text/javascript"></script>
    <link rel="stylesheet" href="_common/styles/styles.css" type="text/css" />
    <link href="_common/styles/style-compressed.css" rel="stylesheet" type="text/css" />
    <link href="_common/styles/form_layout.css" rel="stylesheet" type="text/css" />
    <link href="_common/styles/compare.css" rel="stylesheet" type="text/css" />
    <link href="_common/styles/dialog.css" rel="stylesheet" type="text/css" />
    <!-- ANALYTICS END -->
    <script type="text/javascript">
        $(document).ready(function () {
            $(".inte_l ul").hover(function () {
                $(this).css("border", "2px solid #ddd");
                $(this).find("li").show();
            }, function () {
                $(this).css("border", "2px solid #fff");
                $(this).find("li").hide();
            })

            validator.setup("#form1");

            $("#txtUsername").blur(function () {
                this.className = 'colorblur';
                ValidateObjExisted("Username", "username");
            });
            $("#txtPassword").blur(function () {
                this.className = 'colorblur';
                ValidateObjExisted("Email", "email");
            });
        })

        function ValidateObjExisted(tagObjId, _otype) {
            bl = true;
            if ($("#txt" + tagObjId).val() != "") {
                $.ajax({
                    type: "POST",
                    url: "register.aspx",
                    data: { _value: $("#txt" + tagObjId).val(), otype: _otype },
                    async: false,
                    success: function (data, textStatus) {
                        if (data == "existed") {
                            $("#span" + tagObjId).html(_otype.replace("username", "用户名已存在。").replace("email", "Email已存在。"));
                            $("#span" + tagObjId).fadeIn("slow");
                            bl = true;
                        } else {
                            $("#span" + tagObjId).html("");
                            $("#span" + tagObjId).fadeOut("slow");
                            bl = false;
                        }
                    }
                });
            }
            return bl;
        }

        function ValidateSubmit() { 
            var bl = validator.validatorAll();
            var bl1 = ValidateObjExisted("Username", "username");
            var bl2 = ValidateObjExisted("Email", "email");

            var bl3;
            if ($("#txtPasswordConfirm").val() == $("#txtPassword").val())
                bl3 = true;
            else {
                $("#spanPasswordConfirm").html("确认密码与密码输入不一致。");
                $("#spanPasswordConfirm").fadeIn("slow");
                bl3 = false;
            }

            if (!bl || !bl1 || !bl2 || !bl3)
                return false;
            else
                return true;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /> 

    <script type="text/javascript">
        <!--
        function ___doPostBack(eventTarget) {
            var theForm = document.forms["form1"];
            if (!theForm) {
                theForm = document.form1;
            }
            if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
                theForm.__EVENTTARGET.value = eventTarget;
                theForm.submit();
            }
        }
        // -->
    </script>
    <div class="cc-cookies">
    </div>
    <uc1:header ID="header1" runat="server" />
    <div class="clear">
    </div>
    <div id="maincontent">
        <!-- Page content -->
        <div class="clear">
        </div>
        <div class="contentInnerWrapper">
            <!-- Body Content -->
            <div id="borderedContainer">
                <div class="leftCol">
                    <div class="form_width"> 
                        <!-- End of DoubleClick Floodlight Tag: Please do not remove -->
                        <div class="fieldsetTop">
                        </div>
                        <div class="fieldsetMidd">
                            <div class="form_content">
                                <div class="formcontent">   
                                    <p class="form_titles">
                                        会员注册</p>         
                                    <div class="errorpaneltop" style="display: none;" id="divErrorMsg" runat="server">
                                        <div class="errorpanelbottom">
                                            <div class="errorcontent">
                                                <h3 class="error">
                                                    错误提示</h3>
                                                <ul>{0}</ul>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="fieldsetBtm"> 
                                    </div>  
                                    <div>
                                        <table border="0" class="quoteForm" style="padding-left: 5px;">
                                            <tbody>
                                                <tr>
                                                    <td align="right" class="ControlTextLabels" style="height: 10px;">
                                                        <span style="color: Red;">*</span>
                                                        <label for="txtUsername">
                                                            用户名：</label>
                                                    </td>
                                                    <td>
                                                        <input type="text" class="textbox" id="txtUsername" name="txtUsername" style="width: 150px;"
                                                            onfocus="this.className='colorfocus';" validatormsg="spanUsername" required="required"
                                                            controlname="用户名" isvalidator />
                                                        <span class="alertPanel" id="spanUsername"></span>
                                                    </td>
                                                </tr>
                                                <tr style="line-height: 8px;">
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" class="ControlTextLabels" style="height: 10px;">
                                                        <span style="color: Red;">*</span>
                                                        <label for="txtPassword">
                                                            密码：</label>
                                                    </td>
                                                    <td>
                                                        <input type="password" class="textbox" id="txtPassword" name="txtPassword" style="width: 150px;"
                                                            onblur="this.className='colorblur';" onfocus="this.className='colorfocus';" validatormsg="spanPassword"
                                                            required="required" controlname="密码" isvalidator />
                                                        <span class="alertPanel" id="spanPassword"></span>
                                                    </td>
                                                </tr> 
                                                <tr style="line-height: 8px;">
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" class="ControlTextLabels" style="height: 10px;">
                                                        <span style="color: Red;">*</span>
                                                        <label for="txtPasswordConfirm">
                                                            确认密码：</label>
                                                    </td>
                                                    <td>
                                                        <input type="password" class="textbox" id="txtPasswordConfirm" name="txtPasswordConfirm"
                                                            style="width: 150px;" onblur="this.className='colorblur';" onfocus="this.className='colorfocus';"
                                                            validatormsg="spanPasswordConfirm" required="required" controlname="确认密码" isvalidator />
                                                        <span class="alertPanel" id="spanPasswordConfirm"></span>
                                                    </td>
                                                </tr> 
                                                <tr style="line-height: 8px;">
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" class="ControlTextLabels">
                                                        <span style="color: Red;">*</span>
                                                        <label for="txtName" >
                                                            姓名：</label>
                                                    </td>
                                                    <td>
                                                        <input type="text" class="textbox" id="txtName" name="txtName" style="width: 150px;"
                                                            onfocus="this.className='colorfocus';" validatormsg="spanName" required="required"
                                                            controlname="姓名" isvalidator /> 
                                                        <span class="alertPanel" id="spanName"></span>
                                                    </td>
                                                </tr> 
                                                <tr style="line-height: 8px;">
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" class="ControlTextLabels">
                                                        <label for="selSex" >
                                                            性别：</label>
                                                    </td>
                                                    <td>
                                                        <select name="selSex" id="selSex"> 
                                                            <option value="0">男</option>
                                                            <option value="1">女</option> 
                                                        </select>
                                                        <span style="color: Red; display: none;"></span>
                                                    </td>
                                                </tr>
                                                <tr style="line-height: 8px;">
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" class="ControlTextLabels" style="height: 10px;">
                                                        <span style="color: Red;">*</span>
                                                        <label for="txtEmail">
                                                            E-Mail：</label>
                                                    </td>
                                                    <td>
                                                        <input type="text" class="textbox" id="txtEmail" name="txtEmail" style="width: 200px;"
                                                            onfocus="this.className='colorfocus';" validatormsg="spanEmail" required="required"
                                                            controlname="E-Mail" isvalidator />
                                                        <span class="alertPanel" id="spanEmail"></span> 
                                                    </td>
                                                </tr> 
                                                <tr style="line-height: 8px;">
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" class="ControlTextLabels" style="height: 10px;">
                                                        <label for="txtMobilePIN">
                                                            联系电话：</label>
                                                    </td>
                                                    <td>
                                                        <input name="txtMobilePIN" type="text" maxlength="15" id="txtMobilePIN" style="width: 200px;" />
                                                        <span style="color: Red; display: none;"></span>
                                                    </td>
                                                </tr> 
                                                <tr style="line-height: 8px;">
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" class="ControlTextLabels" style="height: 10px;">
                                                        <label for="txtPhone">
                                                            通讯地址：</label>
                                                    </td>
                                                    <td>
                                                        <input name="txtAddress" type="text" maxlength="15" id="txtAddress" style="width: 350px;" />
                                                        <span style="color: Red; display: none;"></span>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div class="fieldsetBtm">
                                </div>
                                <img alt="" style="cursor: pointer; float: left; margin-top: 10px;" onclick="history.go(-1)"
                                    src="_imgs/back.png" />
                                <input type="button" name="btnSubmit" id="btnSubmit" onclick="if(ValidateSubmit()){this.disabled=true;___doPostBack('register');}" style="border-width: 0px; float: right;
                                    margin-top: 10px; background: url('_imgs/login.gif') no-repeat; width: 195px; height: 41px; cursor: pointer;" />
                            </div>
                            <div class="clearBoth">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="rightCol">
                    <div class="side_pod">
                        <div class="top">
                        </div>
                        <div class="midd">
                            <p class="summary_heading">
                                注册遇到了问题？</p>
                            <div style="width: 100%;">
                                <p style="margin-left: 10px; margin-right: 10px;">
                                    请致电我们的客服团队，他们将为你解决购买过程中的问题。
                                </p>
                            </div>
                        </div>
                        <div class="bottom">
                        </div>
                        <br>
                        <a href="Default.aspx">
                            <img src="_imgs/new_quote.png" alt="Start a new quote &gt;" style="margin-top: 0;"></a>
                    </div>
                </div>
                <div class="clearBoth">
                </div>
            </div>
        </div>
    </div>
    <div class="clear">
    </div>
    <uc2:footer ID="footer1" runat="server" />
    </form>
</body>
</html>
